#include <stdio.h>

int main() {
	int num = 1;
	int end_num = 100;
	int count = 0;

count_nine:
	if (num % 10 == 9) count++;
	if (num / 10 == 9) count++;
	num++;

	if (num <= end_num) goto count_nine;
	printf("%d", count);

	return 0;
}